{set:$isWrite = ($pay_status == 0 && Order_Class::isSellerRefund($id,$this->seller['seller_id']) == 2) ? true : false}
<h1 class="page_title">商品退款详情</h1>
<div class="refundment_item">
	<p>
		<strong>订单号</strong>{$order_no}<br>
		<strong>订单时间</strong>{$create_time}<br>
		<strong>订单商品应付金额</strong>￥{$payable_amount}<br>
		<strong>订单商品实付金额</strong>￥{$real_amount}<br>
		<strong>订单运费应付金额</strong>￥{$payable_freight}<br>
		<strong>订单运费实付金额</strong>￥{$real_freight}<br>
		<strong>订单保价金额</strong>￥{$insured}<br>
		<strong>订单税金金额</strong>￥{$taxes}<br>
		<strong>订单促销活动优惠金额</strong>￥{$promotions}<br>
		{if:$discount}
		<strong>订单金额增减</strong>￥{$discount}<br>
		{/if}
		<strong>订单总额</strong>￥{$order_amount}<br>
		{query:name=order where=id eq $order_id items=$orderList}{/query}
		{set:$refundRowCount = CountSum::countSellerOrderFee($orderList)}
		<strong>订单此前已退金额</strong>￥{$refundRowCount['refundFee']}<br><br>
		<strong>退款商品</strong>
		{query:name=order_goods where=id in ($order_goods_id)}
		{set:$goods = JSON::decode($item['goods_array'])}
		<span class="goods"><em class="num"> × {$item['goods_nums']}</em>{$goods['name']}</span>
		<span class="goods_sta">
			<em class="sta">【{echo:Order_Class::goodsSendStatus($item['is_send'])}】</em>
			<em class="sta">【商品金额：￥{echo:$item['goods_nums'] * $item['real_price']}】</em>
		</span>
		{/query}<br>
		<strong>此退款单退款金额</strong>￥{$amount}<br>
		<strong>退款原因</strong>￥{$content}<br>
		{if:$isWrite == false}
		<strong>退款方式</strong>{echo:Order_Class::refundWay($way)}<br>
		<strong>处理状态</strong>{echo:Order_Class::refundmentText($pay_status)}<br>
		<strong>处理时间</strong>{$dispose_time}<br>
		<strong>处理回复</strong>{$dispose_idea}<br>

		{/if}
	</p>
</div>
{if:$isWrite == true}
<section class="input_li">
	<form action="{url:/seller/refundment_update}" name="refundForm" method="post">
		<input type="hidden" name="id" value="{$id}" />
		<ul>
			<li>
				<span class="li_item">处理方法：</span>
				<label class="input_radio pay_status"><input type='radio' name='pay_status' value='2' /><span>同意</span></label>
				<label class="input_radio pay_status"><input type='radio' name='pay_status' value='1' /><span>拒绝</span></label>
			</li>
			<li class="jejs" style="display:none">
				<span class="li_item">金额计算：</span>
				<label class="input_radio isauto"><input type="radio" name="isAuto" value="1" checked="checked" /><span>自动计算【默认】</span></label>
				<label class="input_radio isauto"><input type="radio" name="isAuto" value="2" /><span>手动填写</span></label>
			</li>
			<li class="tkje" style="display:none">
				<span class="input_item">退款金额</span>
				<input type='text' class="input_text tkje_inp" name='title'  />
			</li>
			<li>
				<span class="input_item">处理回复</span>
				<textarea class="input_textarea" name="dispose_idea"></textarea>
			</li>
			<li>
				<input type="submit" class="input_submit" value="确 定" />
			</li>
		</ul>
	</form>
</section>
<script>
$(function(){
	var $payS = $(".pay_status"),
		$isA = $(".isauto"),
		$jejs = $(".jejs"),
		$tkje = $(".tkje"),
		$tkje_inp = $(".tkje_inp");
	$payS.on("click",function(){
		var t = $(this),
			v = t.children("input").val()
		if (v==2) {
			$jejs.show();
		}else{
			$jejs.hide();
			$tkje.hide();
			$tkje_inp.val("");
		}
	});
	$isA.on("click",function(){
		var t = $(this),
			v = t.children("input").val()
		if (v==1) {
			$tkje.hide();
		}else{
			$tkje.show();

			$tkje_inp.val("");
		}
	})
})
</script>
{else:}
<section class="input_li">
	<ul>
		<li>
			<input type="button" onclick="window.location.href='{url:/seller/refundment_list}';"  class="input_submit" value="返回上一页" />
		</li>
	</ul>
</section>
{/if}
